<?php
  include("../includes/connection.php");
?>
<table class="table table-bordered table-striped">
  <thead>
    <tr style="background-color: #eeeeee;">
      <th class="center">NO</th>
      <th class="center">PORTFOLIO</th>
      <th class="center">OPTION</th>
    </tr>
  </thead>
  <tbody>
    <?php
      $i = 1;
      $sql = "SELECT * FROM tb_portfolio ORDER BY id DESC";
      $query = mysql_query($sql);
      while($result = mysql_fetch_array($query))
      {
        echo "
          <tr>
            <td width='10%' class='center'>$i</td>
            <td width='70%'>$result[judul]</td>
            <td width='20%' class='center'>
              <a href='portfolio-edit.php?id=$result[id]&code=edit'><i onmouseover=\"$(this).tooltip('show')\" data-toggle='tooltip' data-placement='top' data-original-title='Edit'  class='glyphicon glyphicon-pencil'></i></a> | 
              <a href='#' class='delete' data-id='$result[id]'><i onmouseover=\"$(this).tooltip('show')\" data-toggle='tooltip' data-placement='top' data-original-title='Hapus'  class='glyphicon glyphicon-remove'></i></a>
              </td>
          </tr>
        ";
        $i++;
      }
    ?>
  </tbody>
</table>